<template>
  <el-select style="width: 100%" ref="select" v-bind="bind" v-on="$listeners" v-model="val">
    <el-option
      v-for="item in attrs.options"
      :key="item.value"
      :label="item.label"
      :value="item.value"
      :disabled="item.disabled"
    />
  </el-select>
</template>
<script>
import { elSelect } from '../msui-utils/msui-default'
export default {
  name: 'MsuiSelectBox',
  props: {
    attrs: {
      type: Object,
      default: () => {
        return {}
      }
    },
    value: {
      type: String | Array | Number,
      default: () => {
        return []
      }
    }
  },
  computed: {
    bind: {
      get() {
        return Object.assign({}, elSelect, this.attrs.bind)
      }
    },
    val: {
      get() {
        return this.value
      },
      set(val) {
        this.$emit('input', val)
      }
    }
  }
}
</script>
